package com.framework.admin.model;

import com.framework.common.config.EntityUpdateListener;
import com.framework.common.listener.impl.BaseEntityUpdate;
import lombok.Data;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EntityListeners;
import javax.persistence.Table;


/**
 * @description: 模块表单字段 model
 * @author: lizurong
 * @version: 1.0
 * @date: 2021-03-09 13:15:40
 */
@Data
@Entity
@Table(name = "sys_module_form_field")
@EntityListeners(EntityUpdateListener.class)
@org.hibernate.annotations.Table(appliesTo = "sys_module_form_field", comment = "模块表单字段")
public class ModuleFormField extends BaseEntityUpdate {

	@Column(nullable = false, columnDefinition = "varchar(32) COMMENT '数据库列名' ")
	private String columnName;

	@Column(nullable = false, columnDefinition = "varchar(32) COMMENT '字段代码' ")
	private String fieldCode;

	@Column(columnDefinition = "varchar(32) COMMENT '字段描述' ")
	private String fieldDesc;

	@Column(nullable = false, columnDefinition = "varchar(32) COMMENT '字段类型' ")
	private String fieldType;

	@Column(nullable = false, columnDefinition = "varchar(32) COMMENT '关联模块表单id' ")
	private String moduleFormId;

	@Column(nullable = false, columnDefinition = "int(2) COMMENT '列表排序' ")
	private Integer listSort;

	@Column(nullable = false, columnDefinition = "int(2) COMMENT '表单排序' ")
	private Integer formSort;

	@Column(columnDefinition = "varchar(500) COMMENT '控件字段格式化' ")
	private String vueFormat;

	@Column(nullable = false, columnDefinition = "int(2) COMMENT '是否表单显示1是2否' ")
	private Integer formShow;

	@Column(nullable = false, columnDefinition = "int(2) COMMENT '是否列表显示1是2否' ")
	private Integer listShow;

	@Column(nullable = false, columnDefinition = "varchar(32) COMMENT '控件类型' ")
	private String vueType;

	@Column(columnDefinition = "int(5) COMMENT '控件长度(百分比)' ")
	private Integer vueLength;

	@Column(columnDefinition = "varchar(55) COMMENT '控件label显示值' ")
	private String vueLabel;

	@Column(nullable = false, columnDefinition = "int(2) COMMENT '是否查询(1是2否)' ")
	private Integer isQuery;

	@Column(columnDefinition = "varchar(32) COMMENT '查询类型' ")
	private String queryType;
}
